// @ts-ignore
/* eslint-disable */
import { postFile, postRequest } from '@/utils/postRequest';
import request from '@/utils/request';

export async function downloadPhotoFile(params: any) {
  return request('/api/v1/photo/downloadPhotoFile', {
    method: 'GET',
    params: params,
  });
}

export async function getPhotoById(params: any) {
  return request('/api/v1/photo/getPhotoById', {
    method: 'GET',
    params: params,
  });
}
export async function getFileById(params: any) {
  return request('/api/v1/photo/getFileById', {
    method: 'GET',
    params: params,
  });
}

export async function getPhotoCategoryList() {
  return request('/api/v1/photo/getPhotoCategoryList', {
    method: 'GET',
  });
}

export async function getPhotoList(params: any, data: any) {
  return request('/api/v1/photo/getPhotoList', {
    method: 'POST',
    data: data,
    params: params,
  });
}
export async function approvePhoto(params: any) {
  return request('/api/v1/photo/approvePhoto', {
    method: 'POST',
    data: params,
  });
}

export async function changePhotoOrder(params: any) {
  return request('/api/v1/photo/changeOrder', {
    method: 'POST',
    data: params,
  });
}

export async function getPhotoFile(params: any) {
  return request('/api/v1/photo/getPhotoFile', {
    method: 'GET',
    params: params,
  });
}

export async function getPhotoListByCategoryId(params: any) {
  return request('/api/v1/photo/getPhotoListByCategoryId', {
    method: 'GET',
    params: params,
  });
}

export async function insertPhotoCategory(params: any) {
  return postRequest('/api/v1/photo/insertPhotoCategory', params);
}

export async function releasePhoto(params: any) {
  return request('/api/v1/photo/releasePhoto', {
    method: 'POST',
    data: params,
  });
}
export async function updatePhoto(params: any) {
  return request('/api/v1/photo/updatePhoto', {
    method: 'POST',
    data: params,
  });
}

export async function updatePhotoCategory(params: any) {
  return postRequest('/api/v1/photo/updatePhotoCategory', params);
}

export async function uploadList(params: any) {
  return request('/api/v1/photo/uploadList', {
    method: 'POST',
    data: params,
  });
}

export async function deletePhotoByPhoId(params: any) {
  return request('/api/v1/photo/deletePhotoByPhoId', {
    method: 'POST',
    params: params,
  });
}

export async function deletePhotoCategoryById(params: any) {
  return request('/api/v1/photo/deletePhotoCategoryById', {
    method: 'POST',
    params: params,
  });
}

// 获取图片列表（不含特色服务）
export async function getPhotoListWithoutSpe(params: any, data: any) {
  return request('/api/v1/photo/getPhotoListWithoutSpe', {
    method: 'POST',
    data: data,
    params: params,
  });
}
